home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Developer Essentials / MPW Interfaces & Libraries / CIncludes / QDOffscreen.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-29  |  3.7 KB  |  132 lines  |  [TEXT/MPS ]

  1.  
  2. /************************************************************
  3.  
  4. Created: Friday, September 13, 1991 at 1:13 PM
  5.  QDOffscreen.h
  6.  C Interface to the Macintosh Libraries
  7.  
  8.  
  9.   Copyright Apple Computer, Inc. 1985-1991
  10.   All rights reserved
  11.  
  12. ************************************************************/
  13.  
  14.  
  15. #ifndef __QDOFFSCREEN__
  16. #define __QDOFFSCREEN__
  17.  
  18. #ifndef __QUICKDRAW__
  19. #include <Quickdraw.h>
  20. #endif
  21.  
  22.  
  23. enum {
  24.  
  25.  
  26. /* New error codes */
  27.  cDepthErr = -157    /*invalid pixel depth*/
  28. };
  29.  
  30. enum {
  31.  pixPurgeBit = 0,
  32.  noNewDeviceBit = 1,
  33.  useTempMemBit = 2,
  34.  keepLocalBit = 3,
  35.  pixelsPurgeableBit = 6,
  36.  pixelsLockedBit = 7,
  37.  mapPixBit = 16,
  38.  newDepthBit = 17,
  39.  alignPixBit = 18,
  40.  newRowBytesBit = 19,
  41.  reallocPixBit = 20,
  42.  clipPixBit = 28,
  43.  stretchPixBit = 29,
  44.  ditherPixBit = 30,
  45.  gwFlagErrBit = 31
  46.  };
  47.  
  48. enum {
  49.  pixPurge = 1 << pixPurgeBit,
  50.  noNewDevice = 1 << noNewDeviceBit,
  51.  useTempMem = 1 << useTempMemBit,
  52.  keepLocal = 1 << keepLocalBit,
  53.  pixelsPurgeable = 1 << pixelsPurgeableBit,
  54.  pixelsLocked = 1 << pixelsLockedBit,
  55.  mapPix = 1 << mapPixBit,
  56.  newDepth = 1 << newDepthBit,
  57.  alignPix = 1 << alignPixBit,
  58.  newRowBytes = 1 << newRowBytesBit,
  59.  reallocPix = 1 << reallocPixBit,
  60.  clipPix = 1 << clipPixBit,
  61.  stretchPix = 1 << stretchPixBit,
  62.  ditherPix = 1 << ditherPixBit,
  63.  gwFlagErr = 1 << gwFlagErrBit
  64.  };
  65.  
  66. typedef unsigned long GWorldFlags;
  67.  
  68.  
  69. /* Type definition of a GWorldPtr */
  70. typedef CGrafPtr GWorldPtr;
  71.  
  72. #ifdef __cplusplus
  73. extern "C" {
  74. #endif
  75. pascal QDErr NewGWorld(GWorldPtr *offscreenGWorld,short PixelDepth,const Rect *boundsRect,
  76.  CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  77.  = {0x203C,0x0016,0x0000,0xAB1D}; 
  78. pascal Boolean LockPixels(PixMapHandle pm)
  79.  = {0x203C,0x0004,0x0001,0xAB1D}; 
  80. pascal void UnlockPixels(PixMapHandle pm)
  81.  = {0x203C,0x0004,0x0002,0xAB1D}; 
  82. pascal GWorldFlags UpdateGWorld(GWorldPtr *offscreenGWorld,short pixelDepth,
  83.  const Rect *boundsRect,CTabHandle cTable,GDHandle aGDevice,GWorldFlags flags)
  84.  = {0x203C,0x0016,0x0003,0xAB1D}; 
  85. pascal void DisposeGWorld(GWorldPtr offscreenGWorld)
  86.  = {0x203C,0x0004,0x0004,0xAB1D}; 
  87. pascal void GetGWorld(CGrafPtr *port,GDHandle *gdh)
  88.  = {0x203C,0x0008,0x0005,0xAB1D}; 
  89. pascal void SetGWorld(CGrafPtr port,GDHandle gdh)
  90.  = {0x203C,0x0008,0x0006,0xAB1D}; 
  91. pascal void CTabChanged(CTabHandle ctab)
  92.  = {0x203C,0x0004,0x0007,0xAB1D}; 
  93. pascal void PixPatChanged(PixPatHandle ppat)
  94.  = {0x203C,0x0004,0x0008,0xAB1D}; 
  95. pascal void PortChanged(GrafPtr port)
  96.  = {0x203C,0x0004,0x0009,0xAB1D}; 
  97. pascal void GDeviceChanged(GDHandle gdh)
  98.  = {0x203C,0x0004,0x000A,0xAB1D}; 
  99. pascal void AllowPurgePixels(PixMapHandle pm)
  100.  = {0x203C,0x0004,0x000B,0xAB1D}; 
  101. pascal void NoPurgePixels(PixMapHandle pm)
  102.  = {0x203C,0x0004,0x000C,0xAB1D}; 
  103. pascal GWorldFlags GetPixelsState(PixMapHandle pm)
  104.  = {0x203C,0x0004,0x000D,0xAB1D}; 
  105. pascal void SetPixelsState(PixMapHandle pm,GWorldFlags state)
  106.  = {0x203C,0x0008,0x000E,0xAB1D}; 
  107. pascal Ptr GetPixBaseAddr(PixMapHandle pm)
  108.  = {0x203C,0x0004,0x000F,0xAB1D}; 
  109. pascal QDErr NewScreenBuffer(const Rect *globalRect,Boolean purgeable,GDHandle *gdh,
  110.  PixMapHandle *offscreenPixMap)
  111.  = {0x203C,0x000E,0x0010,0xAB1D}; 
  112. pascal void DisposeScreenBuffer(PixMapHandle offscreenPixMap)
  113.  = {0x203C,0x0004,0x0011,0xAB1D}; 
  114. pascal GDHandle GetGWorldDevice(GWorldPtr offscreenGWorld)
  115.  = {0x203C,0x0004,0x0012,0xAB1D}; 
  116. pascal Boolean QDDone(GrafPtr port)
  117.  = {0x203C,0x0004,0x0013,0xAB1D}; 
  118. pascal long OffscreenVersion(void)
  119.  = {0x7014,0xAB1D}; 
  120. pascal QDErr NewTempScreenBuffer(const Rect *globalRect,Boolean purgeable,
  121.  GDHandle *gdh,PixMapHandle *offscreenPixMap)
  122.  = {0x203C,0x000E,0x0015,0xAB1D}; 
  123. pascal Boolean PixMap32Bit(PixMapHandle pmHandle)
  124.  = {0x203C,0x0004,0x0016,0xAB1D}; 
  125. pascal PixMapHandle GetGWorldPixMap(GWorldPtr offscreenGWorld)
  126.  = {0x203C,0x0004,0x0017,0xAB1D}; 
  127. #ifdef __cplusplus
  128. }
  129. #endif
  130.  
  131. #endif
  132.